<div id="wapper">
  <div id="content">
    <?php $this->load->view("layouts/left"); ?>
    <div id="contentm">
    <div class="homelink">&spades; <a href="<?php echo base_url(); ?>">Trang chủ</a> &raquo; <a href="<?php echo $category['rewrite']; ?>.html" title="<?php echo $category['names']; ?>"><?php echo $category['names']; ?></a>
    </div>
    <div id="findques">
      <form action="javascript:void(0)" method="">
        <input type="text" name="keyword" class="findques" size="40" />
        <input type="submit" value="Tìm trả lời" class="findsub" name="submit" />
      </form>
    </div>
    <div id="topquest">
      <div class="toptitle">
        <h2><?php echo $category['names']; ?></h2>
      </div>
      <?php $this->load->library("string"); ?>
      <div class="questlist">
        <?php if(isset($results)){foreach($results as $question){ ?>
        <div class="questions">
          <div class="quesleft"> 
          	<img src="<?php if($question['image'] != NULL){ echo base_url()."uploads/users/thumb/".$question['image']; }else{ echo base_url(); ?>public/images/noavatar.gif <?php } ?>" width="50" alt="<?php echo $question['username']; ?>" title="<?php echo $question['username']; ?>" />
            <p><?php echo $question['username']; ?></p>
          </div>
          <div class="quesright">
            <h3><a href="<?php echo base_url().$question['rewrite']."-".$question['id']; ?>.html" title="<?php echo $question['title']; ?>"><?php echo $question['title']; ?></a></h3>
            <p class="qinfo">Gửi bởi <a href="#"><?php echo $question['username']; ?></a> lúc <?php echo $question['datetime']; ?></p>
            <?php $shortquestion = $this->string->cutstr($question['info'],150); ?>
            <p><?php echo $shortquestion; ?></p>
          </div>
        </div>
        <?php } } ?>
        <div class="cls"></div>
      </div>
      <div id="pagination"><?php echo $this->pagination->create_links(); ?></div>
      <!--div class="adsga" style="margin-top:30px"><img src="<?php echo base_url(); ?>public/images/ads.jpg" alt="" /></div--> 
    </div>
  </div>
    <?php $this->load->view("layouts/right"); ?>
    <div class="cls"></div>
  </div>
</div>